package com.sk.bilibili.apiMapper.component;

import org.json.JSONObject;

/**
 * @author 邵康
 * @date 2021/11/26 16:25
 * 用于处理 直接返回的基本数据
 */
public class BaseDataHandler {

    public Object handle(JSONObject object, String path, Class clazz) {
        if(clazz.equals(String.class))return object.getString(path);
        if(clazz.equals(Integer.class))return object.getInt(path);
        return null;
    }

}
